0.1.58 migrated & CMUX patch (Transparent mode in tcore_pending_free)
authorKo Hayoon <hayoon.ko@samsung.com>
Tue, 4 Sep 2012 00:58:07 +0000 (09:58 +0900)
committerKo Hayoon <hayoon.ko@samsung.com>
Tue, 4 Sep 2012 00:58:07 +0000 (09:58 +0900)
include/co_context.h
include/log.h
packaging/libtcore.spec
src/co_context.c
src/queue.c

index 2a72ed0b0157f33fd797b5e17e91d75a3c27303e..64aeca244153cd3dd046a9005bbcd6151fa8fe72 100644 (file)
@@ -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);
index 7b298cfd206bd2ecd31969f0677389dd9bef61fd..4966982f02c6c467db452855ae29efe959e978a4 100644 (file)
@@ -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);
index 5f0fc25a455420b16d9f4c4d8bde06b41f820e64..bd7cb92e233a74e9dd3e0d19bb84b6a314c447db 100755 (executable)
@@ -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
index 5973305b60acf4c428c621024aa13d20ff840c25..dce8a7fb28981a8e8adbcb9e82078902b7c9542d 100644 (file)
@@ -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;
index 3d1a5552f33884e8657f1b1a279ecf77edadcc4c..83704b48c8b38d39d401f1e2e122e6455966ad59 100644 (file)
@@ -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);
        }