Ignore:
Timestamp:
Oct 24, 2006 5:13:30 PM (17 years ago)
Author:
bennylp
Message:

Bulk of PJLIB implementations on Symbian: exception framework, errno, OS core, Unicode, pool backend, log (to console), socket, address resolution, select, etc. IOQueue still doesn't work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/symbian/pjlib/src/pjlib-test/sock.c

    r433 r788  
    1717 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
    1818 */ 
    19 #include <pjlib.h> 
     19#include <pj/errno.h> 
     20#include <pj/ioqueue.h> 
     21#include <pj/log.h> 
     22#include <pj/sock.h> 
     23#include <pj/string.h> 
    2024#include "test.h" 
    2125 
     
    6569#define BIG_DATA_LEN    9000 
    6670#define ADDRESS         "127.0.0.1" 
    67 #define A0              127 
    68 #define A1              0 
    69 #define A2              0 
    70 #define A3              1 
    7171 
    7272 
     
    8080    pj_in_addr addr; 
    8181    const pj_str_t *hostname; 
     82#if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 
     83    /* Symbian IP address is saved in host order */ 
     84    unsigned char A[] = {1, 0, 0, 127}; 
     85#else 
     86    unsigned char A[] = {127, 0, 0, 1}; 
     87#endif 
    8288 
    8389    PJ_LOG(3,("test", "...format_test()")); 
     
    8995    /* Check the result. */ 
    9096    p = (unsigned char*)&addr; 
    91     if (p[0]!=A0 || p[1]!=A1 || p[2]!=A2 || p[3]!=A3) { 
     97    if (p[0]!=A[0] || p[1]!=A[1] || p[2]!=A[2] || p[3]!=A[3]) { 
    9298        PJ_LOG(3,("test", "  error: mismatched address. p0=%d, p1=%d, " 
    9399                          "p2=%d, p3=%d", p[0] & 0xFF, p[1] & 0xFF,  
     
    97103 
    98104    /* pj_inet_ntoa() */ 
    99     p = pj_inet_ntoa(addr); 
     105    p = (unsigned char*)pj_inet_ntoa(addr); 
    100106    if (!p) 
    101107        return -20; 
    102108 
    103     if (pj_strcmp2(&s, p) != 0) 
     109    if (pj_strcmp2(&s, (char*)p) != 0) 
    104110        return -30; 
    105111 
Note: See TracChangeset for help on using the changeset viewer.