From: Ko Hayoon Date: Tue, 4 Sep 2012 00:58:07 +0000 (+0900) Subject: 0.1.58 migrated & CMUX patch (Transparent mode in tcore_pending_free) X-Git-Tag: 2.0_alpha~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=409dfe3b525e80c3f199437dffd2ebaa7ef85fba;p=platform%2Fcore%2Ftelephony%2Flibtcore.git 0.1.58 migrated & CMUX patch (Transparent mode in tcore_pending_free) --- diff --git a/include/co_context.h b/include/co_context.h index 2a72ed0..64aeca2 100644 --- a/include/co_context.h +++ b/include/co_context.h @@ -45,6 +45,10 @@ enum co_context_role { CONTEXT_ROLE_UNKNOWN, CONTEXT_ROLE_INTERNET, CONTEXT_ROLE_MMS, + CONTEXT_ROLE_PREPAID_INTERNET, + CONTEXT_ROLE_PREPAID_MMS, + CONTEXT_ROLE_TETHERING, + CONTEXT_ROLE_USER_DEFINED, }; enum co_context_d_comp { @@ -103,6 +107,8 @@ TReturn tcore_context_set_proxy(CoreObject *o, const char *prox char* tcore_context_get_proxy(CoreObject *o); TReturn tcore_context_set_mmsurl(CoreObject *o, const char *mmsurl); char* tcore_context_get_mmsurl(CoreObject *o); +TReturn tcore_context_set_profile_name(CoreObject *o, const char *profile_name); +char* tcore_context_get_profile_name(CoreObject *o); TReturn tcore_context_set_devinfo(CoreObject *o, struct tnoti_ps_pdp_ipconfiguration *devinfo); TReturn tcore_context_reset_devinfo(CoreObject *o); diff --git a/include/log.h b/include/log.h index 7b298cf..4966982 100644 --- a/include/log.h +++ b/include/log.h @@ -31,7 +31,8 @@ __BEGIN_DECLS #define TCORE_LOG_TAG "UNKNOWN" #endif -#define msg(fmt,args...) { RLOG(LOG_INFO, TCORE_LOG_TAG, fmt "\n", ##args); } +#define info(fmt,args...) { RLOG(LOG_INFO, TCORE_LOG_TAG, fmt "\n", ##args); } +#define msg(fmt,args...) { RLOG(LOG_DEBUG, TCORE_LOG_TAG, fmt "\n", ##args); } #define dbg(fmt,args...) { RLOG(LOG_DEBUG, TCORE_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } #define warn(fmt,args...) { RLOG(LOG_WARN, TCORE_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } #define err(fmt,args...) { RLOG(LOG_FATAL, TCORE_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } @@ -66,6 +67,7 @@ __BEGIN_DECLS #define TCORE_LOG_FUNC fprintf #endif +#define info(fmt,args...) TCORE_LOG_FUNC(TCORE_LOG_FILE, fmt "\n", ##args); fflush(TCORE_LOG_FILE); #define msg(fmt,args...) TCORE_LOG_FUNC(TCORE_LOG_FILE, fmt "\n", ##args); fflush(TCORE_LOG_FILE); #define dbg(fmt,args...) TCORE_LOG_FUNC(TCORE_LOG_FILE, ANSI_COLOR_LIGHTGRAY "<%s:%s> " ANSI_COLOR_NORMAL fmt "\n", __FILE__, __FUNCTION__, ##args); fflush(TCORE_LOG_FILE); #define warn(fmt,args...) TCORE_LOG_FUNC(TCORE_LOG_FILE, ANSI_COLOR_YELLOW "<%s:%s> " ANSI_COLOR_NORMAL fmt "\n", __FILE__, __FUNCTION__, ##args); fflush(TCORE_LOG_FILE); diff --git a/packaging/libtcore.spec b/packaging/libtcore.spec index 5f0fc25..bd7cb92 100755 --- a/packaging/libtcore.spec +++ b/packaging/libtcore.spec @@ -1,7 +1,7 @@ #sbs-git:slp/pkgs/l/libtcore Name: libtcore Summary: Telephony-core library -Version: 0.1.57 +Version: 0.1.59 Release: 1 Group: System/Libraries License: Apache diff --git a/src/co_context.c b/src/co_context.c index 5973305..dce8a7f 100644 --- a/src/co_context.c +++ b/src/co_context.c @@ -56,6 +56,7 @@ struct private_object_data { char *proxy; char *mmsurl; + char *profile_name; char devname[16]; }; @@ -616,6 +617,44 @@ char *tcore_context_get_mmsurl(CoreObject *o) return g_strdup(po->mmsurl); } +TReturn tcore_context_set_profile_name(CoreObject *o, const char *profile_name) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, TCORE_RETURN_EINVAL); + + po = tcore_object_ref_object(o); + if (!po) + return FALSE; + + if (po->profile_name) { + free(po->profile_name); + po->profile_name = NULL; + } + + if (profile_name) { + po->profile_name = g_strdup(profile_name); + } + + return TCORE_RETURN_SUCCESS; +} + +char *tcore_context_get_profile_name(CoreObject *o) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, NULL); + + po = tcore_object_ref_object(o); + if (!po) + return NULL; + + if (!po->profile_name) + return NULL; + + return g_strdup(po->profile_name); +} + TReturn tcore_context_set_devinfo(CoreObject *o, struct tnoti_ps_pdp_ipconfiguration *devinfo) { struct private_object_data *po = NULL; diff --git a/src/queue.c b/src/queue.c index 3d1a555..83704b4 100644 --- a/src/queue.c +++ b/src/queue.c @@ -131,7 +131,9 @@ void tcore_pending_free(TcorePending *pending) dbg("pending(0x%x) free, id=0x%x", (unsigned int)pending, pending->id); - if (tcore_hal_get_mode(pending->queue->hal) != TCORE_HAL_MODE_AT) { + if ((tcore_hal_get_mode(pending->queue->hal) != TCORE_HAL_MODE_AT) + && (tcore_hal_get_mode(pending->queue->hal) != TCORE_HAL_MODE_TRANSPARENT)) + { if (pending->data) free(pending->data); }