bugTransport Sample Protocol - Bugs: bug #17982, argc and argv in tsp_xxx_init

 
 

bug #17982: argc and argv in tsp_xxx_init

Submitted by:  Alan <pratal>
Submitted on:  Thu 12 Oct 2006 01:42:36 PM UTC  
 
Category: CoreSeverity: 3 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 0.8.0Fixed Release: Unknown

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 24 Jan 2007 06:39:05 PM UTC, comment #1:

This looks like a programming error.

Try allocation sizeof(char*) instead of sizeof(char).

Robert de Vries <rhdv>
Project Member
Thu 12 Oct 2006 01:42:36 PM UTC, original submission:

_EXPORT_TSP_PROVIDER int32_t
TSP_provider_init(GLU_handle_t* theGLU, int* argc, char** argv[]);

_EXPORT_TSP_CONSUMER int32_t
TSP_consumer_init(int* argc, char** argv[]);

In MFC application there is not always a main so argc and argv have to be declared :

int argc = 9;
char** argv = 0;

argv = (char*)calloc(argc, sizeof(char));

argv[0] = strdup("tsp_stdout_client");
argv[1] = ...

TSP_consumer_init(&argc, &argv)

Alan <pratal>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rhdv (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1