- Timestamp:
- Dec 28, 2016 3:40:07 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjsip/src/pjsua-lib/pjsua_pres.c
r4713 r5513 250 250 251 251 /* contact */ 252 info->contact.ptr = info->buf_ + total; 253 pj_strncpy(&info->contact, &buddy->contact, sizeof(info->buf_)-total); 254 total += info->contact.slen; 252 if (total < sizeof(info->buf_)) { 253 info->contact.ptr = info->buf_ + total; 254 pj_strncpy(&info->contact, &buddy->contact, sizeof(info->buf_) - total); 255 total += info->contact.slen; 256 } else { 257 info->contact = pj_str(""); 258 } 255 259 256 260 /* Presence status */ … … 552 556 return status; 553 557 554 PJ_LOG(4,(THIS_FILE, "Buddy %d: unsubscribing presence..", buddy_id));555 558 pj_log_push_indent(); 556 559 … … 852 855 853 856 /* Create UAS dialog: */ 854 status = pjsip_dlg_create_uas (pjsip_ua_instance(), rdata,855 &contact, &dlg);857 status = pjsip_dlg_create_uas_and_inc_lock(pjsip_ua_instance(), rdata, 858 &contact, &dlg); 856 859 if (status != PJ_SUCCESS) { 857 860 pjsua_perror(THIS_FILE, … … 918 921 } 919 922 923 pjsip_dlg_dec_lock(dlg); 920 924 PJSUA_UNLOCK(); 921 925 pj_log_pop_indent(); 922 926 return PJ_TRUE; 923 927 } 928 929 /* Subscription has been created, decrement & release dlg lock */ 930 pjsip_dlg_dec_lock(dlg); 924 931 925 932 /* If account is locked to specific transport, then lock dialog … … 1032 1039 1033 1040 /* Done: */ 1034 1035 1041 PJSUA_UNLOCK(); 1036 1042 pj_log_pop_indent();
Note: See TracChangeset
for help on using the changeset viewer.