From 102c9ba757dfa17896e4d59ff8ff03edbc4d7524 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Thu, 23 Jan 2014 08:13:11 +0000 Subject: Misc (re #1630): Fixed symbols that should not be exported (thanks Tzafrir Cohen for the patch). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4713 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib-util/src/pjlib-util/base64.c | 2 +- pjlib-util/src/pjlib-util/getopt.c | 2 +- pjlib-util/src/pjlib-util/http_client.c | 4 ++-- pjlib/src/pj/pool_buf.c | 2 +- pjmedia/src/pjmedia-codec/g722/g722_dec.c | 2 +- pjmedia/src/pjmedia-codec/speex_codec.c | 2 +- pjmedia/src/pjmedia/echo_suppress.c | 2 +- pjnath/src/pjnath/ice_session.c | 4 ++-- pjsip/src/pjsip-simple/presence.c | 14 +++++++------- pjsip/src/pjsip-ua/sip_100rel.c | 6 +++--- pjsip/src/pjsip-ua/sip_inv.c | 8 ++++---- pjsip/src/pjsip-ua/sip_xfer.c | 8 ++++---- pjsip/src/pjsip/sip_transport.c | 4 ++-- pjsip/src/pjsip/sip_transport_loop.c | 4 ++-- pjsip/src/pjsua-lib/pjsua_acc.c | 2 +- pjsip/src/pjsua-lib/pjsua_pres.c | 8 ++++---- 16 files changed, 37 insertions(+), 37 deletions(-) diff --git a/pjlib-util/src/pjlib-util/base64.c b/pjlib-util/src/pjlib-util/base64.c index b28e7527..42d0e47e 100644 --- a/pjlib-util/src/pjlib-util/base64.c +++ b/pjlib-util/src/pjlib-util/base64.c @@ -24,7 +24,7 @@ #define INV -1 #define PADDING '=' -const char base64_char[] = { +static const char base64_char[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', diff --git a/pjlib-util/src/pjlib-util/getopt.c b/pjlib-util/src/pjlib-util/getopt.c index 6edf186a..0a560f02 100644 --- a/pjlib-util/src/pjlib-util/getopt.c +++ b/pjlib-util/src/pjlib-util/getopt.c @@ -111,7 +111,7 @@ int pj_optind = 1; causes problems with re-calling pj_getopt as programs generally don't know that. */ -int __getopt_initialized = 0; +static int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. diff --git a/pjlib-util/src/pjlib-util/http_client.c b/pjlib-util/src/pjlib-util/http_client.c index 74884d63..5612ca8e 100644 --- a/pjlib-util/src/pjlib-util/http_client.c +++ b/pjlib-util/src/pjlib-util/http_client.c @@ -1496,8 +1496,8 @@ on_error: /* snprintf() to a pj_str_t struct with an option to append the * result at the back of the string. */ -void str_snprintf(pj_str_t *s, size_t size, - pj_bool_t append, const char *format, ...) +static void str_snprintf(pj_str_t *s, size_t size, + pj_bool_t append, const char *format, ...) { va_list arg; int retval; diff --git a/pjlib/src/pj/pool_buf.c b/pjlib/src/pj/pool_buf.c index bf36b0e0..f1cb3d24 100644 --- a/pjlib/src/pj/pool_buf.c +++ b/pjlib/src/pj/pool_buf.c @@ -21,7 +21,7 @@ #include #include -struct pj_pool_factory stack_based_factory; +static struct pj_pool_factory stack_based_factory; struct creation_param { diff --git a/pjmedia/src/pjmedia-codec/g722/g722_dec.c b/pjmedia/src/pjmedia-codec/g722/g722_dec.c index 27300c52..d04ee3aa 100644 --- a/pjmedia/src/pjmedia-codec/g722/g722_dec.c +++ b/pjmedia/src/pjmedia-codec/g722/g722_dec.c @@ -450,7 +450,7 @@ static int block5h (int dh, int sh) return (rh) ; } -void rx_qmf(g722_dec_t *dec, int rl, int rh, int *xout1, int *xout2) +static void rx_qmf(g722_dec_t *dec, int rl, int rh, int *xout1, int *xout2) { int i; diff --git a/pjmedia/src/pjmedia-codec/speex_codec.c b/pjmedia/src/pjmedia-codec/speex_codec.c index ab9b509a..8a82b0ca 100644 --- a/pjmedia/src/pjmedia-codec/speex_codec.c +++ b/pjmedia/src/pjmedia-codec/speex_codec.c @@ -725,7 +725,7 @@ static pj_status_t spx_codec_modify(pjmedia_codec *codec, /* This function will iterate frames & submodes in the Speex bits. * Returns 0 if a frame found, otherwise returns -1. */ -int speex_get_next_frame(SpeexBits *bits) +static int speex_get_next_frame(SpeexBits *bits) { static const int inband_skip_table[NB_SUBMODES] = {1, 1, 4, 4, 4, 4, 4, 4, 8, 8, 16, 16, 32, 32, 64, 64 }; diff --git a/pjmedia/src/pjmedia/echo_suppress.c b/pjmedia/src/pjmedia/echo_suppress.c index 85a6efb4..ec699d71 100644 --- a/pjmedia/src/pjmedia/echo_suppress.c +++ b/pjmedia/src/pjmedia/echo_suppress.c @@ -125,7 +125,7 @@ typedef enum talk_state ST_REM_TALK } talk_state_t; -const char *state_names[] = +static const char *state_names[] = { "Null", "local talking", diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c index a4068714..f2de0c9b 100644 --- a/pjnath/src/pjnath/ice_session.c +++ b/pjnath/src/pjnath/ice_session.c @@ -1986,8 +1986,8 @@ static void periodic_timer(pj_timer_heap_t *th, /* Utility: find string in string array */ -const pj_str_t *find_str(const pj_str_t *strlist[], unsigned count, - const pj_str_t *str) +static const pj_str_t *find_str(const pj_str_t *strlist[], unsigned count, + const pj_str_t *str) { unsigned i; for (i=0; istate; pj_bool_t dont_notify = PJ_FALSE; @@ -283,8 +283,8 @@ void inv_set_state(pjsip_inv_session *inv, pjsip_inv_state state, /* * Set cause code. */ -void inv_set_cause(pjsip_inv_session *inv, int cause_code, - const pj_str_t *cause_text) +static void inv_set_cause(pjsip_inv_session *inv, int cause_code, + const pj_str_t *cause_text) { if (cause_code > inv->cause) { inv->cause = (pjsip_status_code) cause_code; diff --git a/pjsip/src/pjsip-ua/sip_xfer.c b/pjsip/src/pjsip-ua/sip_xfer.c index 571b807b..d9b4a5b5 100644 --- a/pjsip/src/pjsip-ua/sip_xfer.c +++ b/pjsip/src/pjsip-ua/sip_xfer.c @@ -76,10 +76,10 @@ PJ_DEF(const pjsip_method*) pjsip_get_refer_method() /* * String constants */ -const pj_str_t STR_REFER = { "refer", 5 }; -const pj_str_t STR_MESSAGE = { "message", 7 }; -const pj_str_t STR_SIPFRAG = { "sipfrag", 7 }; -const pj_str_t STR_SIPFRAG_VERSION = {";version=2.0", 12 }; +static const pj_str_t STR_REFER = { "refer", 5 }; +static const pj_str_t STR_MESSAGE = { "message", 7 }; +static const pj_str_t STR_SIPFRAG = { "sipfrag", 7 }; +static const pj_str_t STR_SIPFRAG_VERSION = {";version=2.0", 12 }; /* diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c index 4851be5c..d8cfd59c 100644 --- a/pjsip/src/pjsip/sip_transport.c +++ b/pjsip/src/pjsip/sip_transport.c @@ -130,7 +130,7 @@ typedef struct transport_data /* * Transport names. */ -struct transport_names_t +static struct transport_names_t { pjsip_transport_type_e type; /* Transport type */ pj_uint16_t port; /* Default port number */ @@ -217,7 +217,7 @@ static void tp_state_callback(pjsip_transport *tp, const pjsip_transport_state_info *info); -struct transport_names_t *get_tpname(pjsip_transport_type_e type) +static struct transport_names_t *get_tpname(pjsip_transport_type_e type) { unsigned i; for (i=0; i