Modified assert handling in service. 11/58311/1
authorpolu.sandeep <polu.sandeep@samsung.com>
Fri, 29 Jan 2016 07:27:07 +0000 (16:27 +0900)
committerpolu.sandeep <polu.sandeep@samsung.com>
Fri, 29 Jan 2016 07:27:07 +0000 (16:27 +0900)
Change-Id: I223902a7195dbee15147f03b484663aa4ddddb92

tg-engine-service/.cproject
tg-engine-service/inc/assert.h [new file with mode: 0644]
tg-engine-service/mtprotocol/mtproto-client.c
tg-engine-service/mtprotocol/mtproto-utils.c
tg-engine-service/mtprotocol/queries.c
tg-engine-service/mtprotocol/structures.c
tg-engine-service/mtprotocol/tgl.h
tg-engine-service/mtprotocol/tools.c

index a3037ff..95f1266 100644 (file)
@@ -37,6 +37,7 @@
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-audio-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-avahi-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-fb-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
@@ -87,6 +86,7 @@
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                </option>
                                                                <option id="gnu.cpp.compiler.option.preprocessor.def.1642053949" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
                                                                        <listOptionValue builtIn="false" value="_DEBUG"/>
+                                                                       <listOptionValue builtIn="false" value="NDEBUG"/>
                                                                        <listOptionValue builtIn="false" value="__OpenBSD__"/>
                                                                </option>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.621529398" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-audio-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-avahi-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-fb-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                </option>
                                                                <option id="gnu.c.compiler.option.preprocessor.def.symbols.815019761" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
                                                                        <listOptionValue builtIn="false" value="_DEBUG"/>
+                                                                       <listOptionValue builtIn="false" value="NDEBUG"/>
                                                                        <listOptionValue builtIn="false" value="__OpenBSD__"/>
                                                                </option>
+                                                               <option id="gnu.c.compiler.option.dialect.std.1039161074" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.919376836" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
                                                        </tool>
                                                        <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.997634515" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
                                                        <tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.667323528" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
                                                                <option id="gnu.both.asm.option.include.paths.679561265" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="../tg-engine-service/tg-engine-service/inc"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/libxml2"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/library"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/appcore-agent"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/appfw"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/badge"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/base"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/cairo"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/calendar-service2"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ckm"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/contacts-svc"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/content"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/context-service"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/dali"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/dali-toolkit"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/dbus-1.0"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/device"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/dlog"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-audio-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-avahi-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-con-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-evas-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-fb-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-file-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-imf-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-imf-evas-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-input-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-input-evas-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-ipc-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ecore-x-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/e_dbus-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/edje-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/eet-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/efl-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/efl-extension"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/efreet-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/eina-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/eina-1/eina"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/eio-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/eldbus-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/elementary-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/embryo-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/eo-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/eom"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ethumb-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ethumb-client-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/evas-1"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ewebkit2-0"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/fontconfig"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/freetype2"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/geofence"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/gio-unix-2.0"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/glib-2.0"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/json-glib-1.0"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/location"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/maps"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/media"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/media-content"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/messaging"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/metadata-editor"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/minicontrol"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/minizip"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/network"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/notification"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/phonenumber-utils"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/sensor"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/shortcut"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/storage"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/system"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/telephony"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/ui"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/web"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/widget_service"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/widget_viewer_evas"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/include/wifi-direct"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/lib/dbus-1.0/include"/>
-                                                                       <listOptionValue builtIn="false" value="/home/sandeep/tizen-sdk-2.4/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-emulator.core/usr/lib/glib-2.0/include"/>
                                                                </option>
                                                                <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1353951193" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-audio-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-avahi-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-fb-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-audio-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-avahi-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-fb-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
diff --git a/tg-engine-service/inc/assert.h b/tg-engine-service/inc/assert.h
new file mode 100644 (file)
index 0000000..4f2e16f
--- /dev/null
@@ -0,0 +1,15 @@
+#include <dlog.h>
+#include <stdarg.h>
+
+#if defined(assert)
+#undef assert
+#endif
+#define assert(a) do { \
+       int ret; \
+       ret = (a); \
+       if (!ret) { \
+               dlog_print(DLOG_DEBUG, "tg-engine-service", "[%s:%d] assert(%s)", __FILE__, __LINE__, #a); \
+       } \
+} while (0)
+
+
index 9697ca0..7f2edea 100644 (file)
@@ -1169,8 +1169,8 @@ static int process_rpc_message(struct tgl_state *TLS, struct connection *c, stru
                fail_session(TLS, S);
                return -1;
        }
-       //sandeep
-       //assert(in_ptr == in_end);
+
+       assert(in_ptr == in_end);
        return 0;
 }
 
index 4e442b6..803b489 100644 (file)
@@ -2,6 +2,10 @@
 #include "tgl.h"
 #include "tools.h"
 
+#if !defined(NDEBUG)
+#error "NDEBUG MUST HAS TO BE DEFINED BEFORE RELEASE THIS"
+#endif
+
 static unsigned long long gcd(unsigned long long a, unsigned long long b)
 {
        return b ? gcd(b, a % b) : a;
index 9887af1..c07aba8 100644 (file)
@@ -369,20 +369,13 @@ int tglq_query_result(struct tgl_state *TLS, long long id)
                                vlogprintf(E_DEBUG, "in_ptr = %p, end_ptr = %p\n", in_ptr, in_end);
                                if (skip_type_any(q->type) < 0) {
                                        vlogprintf(E_ERROR, "Skipped %ld int out of %ld(type %s)\n",(long)(in_ptr - save),(long)(in_end - save), q->type->type->id);
-                                       //sandeep
-                                       //assert(0);
-                                       return 0;
-                               }
-                               // sandeep
-                               //assert(in_ptr == in_end);
-                               if (in_ptr != in_end) {
-                                       return 0;
+                                       assert(0);
                                }
+                               assert(in_ptr == in_end);
                                in_ptr = save;
                        }
                        q->methods->on_answer(TLS, q);
-                       // sandeep
-                       //assert(in_ptr == in_end);
+                       assert(in_ptr == in_end);
                }
                tfree(q->data, 4 * q->data_len);
                TLS->timer_methods->free(q->ev);
index 8c70a1f..152b8bd 100644 (file)
@@ -1833,7 +1833,7 @@ void tgls_free_message_media(struct tgl_state *TLS, struct tgl_message_media *M)
                return;
        default:
                vlogprintf(E_ERROR, "type = 0x%08x\n", M->type);
-               //assert(0);
+               assert(0);
        }
 }
 
@@ -2083,7 +2083,7 @@ void tglm_update_message_id(struct tgl_state *TLS, struct tgl_message *M, long l
 
 void tglm_message_insert_tree(struct tgl_state *TLS, struct tgl_message *M)
 {
-       //assert(M->id);
+       assert(M->id);
        TLS->message_tree = tree_insert_message(TLS->message_tree, M, lrand48());
 }
 
index 74e60b8..301410d 100644 (file)
@@ -116,7 +116,7 @@ struct tgl_state;
 struct tgl_update_callback {
   void(*new_msg)(struct tgl_state *TLS, struct tgl_message *M);
   void(*marked_read)(struct tgl_state *TLS, int num, struct tgl_message *list[]);
-  void(*logprintf)(const char *format, ...)  __attribute__((format(printf, 1, 2)));
+  void(*logprintf)(const char *format, ...);//  __attribute__((format(printf, 1, 2)));
   void(*get_string)(struct tgl_state *TLS, const char *prompt, int flags, void(*callback)(struct tgl_state *TLS, char *string, void *arg), void *arg);
   void(*logged_in)(struct tgl_state *TLS);
   void(*started)(struct tgl_state *TLS);
index f8a7885..db53123 100644 (file)
@@ -35,6 +35,8 @@
 #include <sys/time.h>
 #include "tools.h"
 
+#include <dlog.h>
+
 #ifdef __MACH__
 #include <mach/clock.h>
 #include <mach/mach.h>
@@ -58,10 +60,22 @@ void logprintf(const char *format, ...) __attribute__((format(printf, 1, 2), wea
 
 void logprintf(const char *format, ...)
 {
+       /*
        va_list ap;
        va_start(ap, format);
        vfprintf(stdout, format, ap);
        va_end(ap);
+       */
+       char buffer[1024];
+
+       va_list ap;
+
+       va_start(ap, format);
+       vsnprintf(buffer, sizeof(buffer), format, ap);
+       va_end(ap);
+
+       dlog_print(DLOG_DEBUG, "tg-engine-service", "%s", buffer);
+
 }
 
 int tgl_snprintf(char *buf, int len, const char *format, ...)