Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8888441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:02:15+00:00 2026-06-14T22:02:15+00:00

I do debug this code: result = conn_process(conn, 1, 0); if (result == CG_ERR_OK)

  • 0

I do debug this code:

result = conn_process(conn, 1, 0);
if (result == CG_ERR_OK) continue;
if (result == CG_ERR_TIMEOUT)
{
    break;   // i'm here!
}

As in debugger i’m at break; I assume that result == CG_ERR_TIMEOUT is true. In Locals I do see:

    result  131075  unsigned int

In Watch I do see:

    CG_ERR_TIMEOUT  error: identifier 'CG_ERR_TIMEOUT' out of scope 

Going to definition shows me such code:

enum {
CG_ERR_OK = 0,
CG_ERR_INTERNAL = CG_RANGE_BEGIN,
CG_ERR_INVALIDARGUMENT,
CG_ERR_UNSUPPORTED,
CG_ERR_TIMEOUT,
CG_ERR_MORE,
CG_ERR_INCORRECTSTATE,
CG_ERR_DUPLICATEID,
CG_ERR_BUFFERTOOSMALL,
CG_ERR_OVERFLOW,
CG_ERR_UNDERFLOW,
CG_RANGE_END
};

So I just wonder why CG_ERR_TIMEOUT == 131075. What a strange magic number?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:02:16+00:00Added an answer on June 14, 2026 at 10:02 pm

    Because CG_RANGE_BEGIN is 131072 (which is 0x20000).

    enum {
    
        CG_ERR_OK = 0,
        CG_ERR_INTERNAL = CG_RANGE_BEGIN,   // == 131072
    

    From now on every enum value is the previous one plus 1:

        CG_ERR_INVALIDARGUMENT,             // == 131072 + 1 = 131073
        CG_ERR_UNSUPPORTED,                 // == 131073 + 1 = 131074
        CG_ERR_TIMEOUT,                     // == 131074 + 1 = 131075
        CG_ERR_MORE,                        // etc.
        CG_ERR_INCORRECTSTATE,
        CG_ERR_DUPLICATEID,
        CG_ERR_BUFFERTOOSMALL,
        CG_ERR_OVERFLOW,
        CG_ERR_UNDERFLOW,
        CG_RANGE_END
    
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

edit: I'm not looking for you to debug this code. If you are familiar
I am trying to debug this piece of code: $(document).track( { 'module' : 'Omniture',
I'm running this C# code in Visual Studio in debug mode: public class MyHandlerFactory
I've spent hours trying to debug this code. I want to get the second-to-last
When taking a photo via MediaStore.ACTION_IMAGE_CAPTURE intent, how can I debug this code? I
I have some code that looks like this: public void SomeMethodThatLoadsUserData() { Stopwatch sw
Well, I am new to CakePHP. So a painful day to debug this. Here
When I run the code below, Safari's debug console tells me: TypeError: Result of
I tried to use this code but it doesn't work. http://developer.apple.com/library/ios/#samplecode/PageControl/Introduction/Intro.html Ld /Users/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Products/Debug-iphonesimulator/Dr Ngoo.app/Dr
What is wrong with this code. The code is finding the javascript and debug1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.