Search Results

Search found 6 results on 1 pages for 'egiakoum1984'.

Page 1/1 | 1 

  • NAPTR support for SLES

    - by egiakoum1984
    Do you know if there is a library in SLES9 or SLES10 which support NAPTR queries for ENUM functionality? The libadns doesn't support NAPTR. There are other libraries which support NAPTR queries but they aren't included in SLES.

    Read the article

  • Strange casting problem with tm structure

    - by egiakoum1984
    I have the following casting problem when my data structure sSpecificData contains a field of type tm: typedef struct { unsigned char data[10000]; } sDataBuffer; typedef struct { int m_Id; sDataBuffer m_Data; } sData; typedef struct { int m_value1; int m_value2; tm m_Date; } sSpecificData; const int SPECIFIC_SVC_DATA_SIZE = sizeof(sSpecificData); typedef struct { int m_Id; sSpecificData m_Data; } sMyData; int main(void) { sData svc; sMyData* ptr1 = (sMyData*) &svc; sSpecificData* ptr2; ptr2 = (sSpecificData*) &svc.m_Data; ptr1->m_Data.m_value1 = 90; ptr1->m_Data.m_value2 = 80; cout << ptr1->m_Data.m_value1 << endl; cout << ptr1->m_Data.m_value2 << endl; cout << ptr2->m_value1 << endl; cout << ptr2->m_value2 << endl; return 0; } Without the field "tm m_Date;" as part of the sSpecificData, the output is correct: 90 80 90 80 With the field "tm m_Date;" as part of the sSpecificData, the output is wrong: 90 80 0 <-- ! 90 <-- ! Is there any idea why my example doesn't work when there is field of type tm as part of the sSpecificData? Thanks!

    Read the article

  • Timestamp issue with localtime and mktime

    - by egiakoum1984
    Please see the code below: #include <iostream> #include <stdlib.h> #include <time.h> using namespace std; int main(void) { time_t current_time = 1270715952; cout << "Subscriber current timestamp:" << current_time << endl; tm* currentTm = localtime(&current_time); char tmp_str[256]; //2010-04-08T11:39:12 snprintf(tmp_str, sizeof(tmp_str), "%04d%02d%02d%02d%02d%02d.000", currentTm->tm_year+1900, currentTm->tm_mon+1, currentTm->tm_mday, currentTm->tm_hour, currentTm->tm_min, currentTm->tm_sec); cout << "Subscriber current date:" << tmp_str << endl; tm tmpDateScheduleFrom, tmpDateScheduleTo; memset(&tmpDateScheduleFrom, 0, sizeof(tm)); memset(&tmpDateScheduleTo, 0, sizeof(tm)); //2010-04-08T11:00 tmpDateScheduleFrom.tm_sec = 0; tmpDateScheduleFrom.tm_min = 0; tmpDateScheduleFrom.tm_hour = 11; tmpDateScheduleFrom.tm_mday = 8; tmpDateScheduleFrom.tm_mon = 3; tmpDateScheduleFrom.tm_year = 110; //2010-04-08T12:00 tmpDateScheduleTo.tm_sec = 0; tmpDateScheduleTo.tm_min = 0; tmpDateScheduleTo.tm_hour = 12; tmpDateScheduleTo.tm_mday = 8; tmpDateScheduleTo.tm_mon = 3; tmpDateScheduleTo.tm_year = 110; time_t localFrom = mktime(&tmpDateScheduleFrom); time_t localTo = mktime(&tmpDateScheduleTo); cout << "Subscriber current timestamp:" << current_time << endl; cout << "Subscriber localFrom:" << localFrom << endl; cout << "Subscriber localTo:" << localTo << endl; return 0; } The results are the following: Subscriber current timestamp:1270715952 Subscriber current date:20100408113912.000 Subscriber current timestamp:1270715952 Subscriber localFrom:1270717200 Subscriber localTo:1270720800 Why the current subscriber timestamp (subscriber date and time: 2010-04-08T11:39:12) is not between the range localFrom (timestamp of date/time: 2010-04-08T11:00:00) and LocalTo (timestamp of date/time: 2010-04-08T12:00:00)?

    Read the article

  • Unsigned long with negative value

    - by egiakoum1984
    Please see the simple code below: #include <iostream> #include <stdlib.h> using namespace std; int main(void) { unsigned long currentTrafficTypeValueDec; long input; input=63; currentTrafficTypeValueDec = (unsigned long) 1LL << input; cout << currentTrafficTypeValueDec << endl; printf("%u \n", currentTrafficTypeValueDec); printf("%ld \n", currentTrafficTypeValueDec); return 0; } Why printf() displays the currentTrafficTypeValueDec (unsigned long) with negative value? The output is: 9223372036854775808 0 -9223372036854775808

    Read the article

  • C-library consists of asynchronous DNS resolver

    - by egiakoum1984
    Need to find a asynchronous DNS resolver implemented in C (except Sofia Resolver) which supports DNS queries for NAPTR, SRV and A records. It would be desired to support internal caching. Any suggestions/recommendations? Currently looking at ldns which supports NAPTR, SVC and A queries. But, If I have understood correctly, it is not asynch DNS resolver.

    Read the article

  • How to produce 64 bit masks?

    - by egiakoum1984
    Based on the following simple program the bitwise left shit operator works only for 32 bits. Is it true? #include <iostream> #include <stdlib.h> using namespace std; int main(void) { long long currentTrafficTypeValueDec; int input; cout << "Enter input:" << endl; cin >> input; currentTrafficTypeValueDec = 1 << (input - 1); cout << currentTrafficTypeValueDec << endl; cout << (1 << (input - 1)) << endl; return 0; } The output of the program: Enter input: 30 536870912 536870912 Enter input: 62 536870912 536870912 How could I produce 64-bit masks?

    Read the article

1