diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-06-01 12:28:44 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-06-01 12:28:44 +0000 |
commit | 45edf54f6aaf54adb7b42f786b60cd3f23d9be2f (patch) | |
tree | 1c92f4947159c5b431e0a9cb696ab0a01d20a234 /pjsip/src/pjsua-lib/pjsua_reg.c | |
parent | ad70abbdad70cbc5e0c61b41531783290fe08f48 (diff) |
Initial work on pjsua ActiveX component
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@487 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_reg.c')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_reg.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_reg.c b/pjsip/src/pjsua-lib/pjsua_reg.c index 3774740a..f85bcd77 100644 --- a/pjsip/src/pjsua-lib/pjsua_reg.c +++ b/pjsip/src/pjsua-lib/pjsua_reg.c @@ -132,7 +132,7 @@ PJ_DEF(pj_status_t) pjsua_acc_get_info( unsigned acc_index, /* * Update registration. If renew is false, then unregistration will be performed. */ -PJ_DECL(void) pjsua_acc_set_registration(unsigned acc_index, pj_bool_t renew) +PJ_DECL(pj_status_t) pjsua_acc_set_registration(unsigned acc_index, pj_bool_t renew) { pj_status_t status = 0; pjsip_tx_data *tdata = 0; @@ -143,11 +143,11 @@ PJ_DECL(void) pjsua_acc_set_registration(unsigned acc_index, pj_bool_t renew) if (status != PJ_SUCCESS) { pjsua_perror(THIS_FILE, "Unable to create registration", status); - return; + return PJ_EINVALIDOP; } } if (!pjsua.acc[acc_index].regc) - return; + return PJ_EINVALIDOP; status = pjsip_regc_register(pjsua.acc[acc_index].regc, 1, &tdata); @@ -155,7 +155,7 @@ PJ_DECL(void) pjsua_acc_set_registration(unsigned acc_index, pj_bool_t renew) } else { if (pjsua.acc[acc_index].regc == NULL) { PJ_LOG(3,(THIS_FILE, "Currently not registered")); - return; + return PJ_EINVALIDOP; } status = pjsip_regc_unregister(pjsua.acc[acc_index].regc, &tdata); } @@ -170,6 +170,8 @@ PJ_DECL(void) pjsua_acc_set_registration(unsigned acc_index, pj_bool_t renew) PJ_LOG(3,(THIS_FILE, "%s sent", (renew? "Registration" : "Unregistration"))); } + + return status; } /* |