Changeset 2374


Ignore:
Timestamp:
Dec 11, 2008 11:03:21 AM (15 years ago)
Author:
bennylp
Message:

Ticket #681: Bugs in sending and receiving instant messages in Python wrapper (thanks Johan Risberg for the patches)

Location:
pjproject/trunk/pjsip-apps/src/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/python/_pjsua.c

    r2260 r2374  
    21382138    content = PyString_ToPJ(pContent); 
    21392139 
     2140    pjsua_msg_data_init(&msg_data); 
     2141 
    21402142    if (pMsgData != Py_None) { 
    21412143        PyObj_pjsua_msg_data *omd; 
     
    21792181         
    21802182    to = PyString_ToPJ(pTo); 
     2183 
     2184    pjsua_msg_data_init(&msg_data); 
    21812185 
    21822186    if (pMsgData != Py_None) { 
  • pjproject/trunk/pjsip-apps/src/python/pjsua.py

    r2221 r2374  
    16731673        self._lib()._err_check("send_request()", self, err) 
    16741674 
    1675  
     1675    def send_pager(self, text, im_id=0, content_type="text/plain",  
     1676                   hdr_list=None): 
     1677        """Send instant message inside a call. 
     1678 
     1679        Keyword arguments: 
     1680        text         -- Instant message to be sent 
     1681        im_id        -- Optional instant message ID to identify this 
     1682                        instant message when delivery status callback 
     1683                        is called. 
     1684        content_type -- MIME type identifying the instant message 
     1685        hdr_list     -- Optional list of headers to be sent with the 
     1686                        request. 
     1687 
     1688        """ 
     1689        lck = self._lib().auto_lock() 
     1690        err = _pjsua.call_send_im(self._id, \ 
     1691                             content_type, text, \ 
     1692                             Lib._create_msg_data(hdr_list), \ 
     1693                             im_id) 
     1694        self._lib()._err_check("send_pager()", self, err) 
     1695 
     1696   
    16761697class BuddyInfo: 
    16771698    """This class contains information about Buddy. Application may  
     
    20852106                self.handle_events(5) 
    20862107                loop = loop + 1 
    2087                 time.sleep(0.050) 
     2108                time.sleep(0.050) 
    20882109        _pjsua.destroy() 
    20892110        _lib = None 
     
    26652686                     body, acc_id): 
    26662687        call = None 
    2667         if call_id == -1: 
     2688        if call_id != -1: 
    26682689            call = self._lookup_call(call_id) 
    26692690        if call: 
     
    26802701                            code, reason, acc_id): 
    26812702        call = None 
    2682         if call_id == -1: 
     2703        if call_id != -1: 
    26832704            call = self._lookup_call(call_id) 
    26842705        if call: 
     
    26952716                      acc_id): 
    26962717        call = None 
    2697         if call_id == -1: 
     2718        if call_id != -1: 
    26982719            call = self._lookup_call(call_id) 
    26992720        if call: 
Note: See TracChangeset for help on using the changeset viewer.