File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine
Include/GameNetwork/GeneralsOnline/HTTP
Source/GameNetwork/GeneralsOnline Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class HTTPRequest
8686 CURLcode m_pendingCURLCode = CURL_LAST;
8787#endif
8888
89- const size_t g_initialBufSize = (1024 * 4 ); // 4KB
89+ const size_t g_initialBufSize = (1024 * 32 ); // 32KB
9090
9191 bool m_bNeedsProgressUpdate = false ;
9292 bool m_bIsStarted = false ;
Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ void HTTPRequest::StartRequest()
7373
7474void HTTPRequest::OnResponsePartialWrite (std::uint8_t * pBuffer, size_t numBytes)
7575{
76+ if (m_currentBufSize_Used + numBytes > m_vecBuffer.size ())
77+ {
78+ size_t newSize = std::max<size_t >(m_vecBuffer.size () * 2 , m_currentBufSize_Used + numBytes);
79+ m_vecBuffer.resize (newSize);
80+ }
81+
7682 // do we need a buffer resize?
7783 if (m_currentBufSize_Used + numBytes >= m_vecBuffer.size ())
7884 {
Original file line number Diff line number Diff line change @@ -847,6 +847,25 @@ void NGMP_OnlineServicesManager::InitSentry()
847847 sentry_options_set_database_path (options, strDumpPath.c_str ());
848848 sentry_options_set_release (options, " generalsonline-client@110725" );
849849
850+ // local player info
851+ int64_t userID = -1 ;
852+ std::string strDisplayname = " Unknown" ;
853+ NGMP_OnlineServices_AuthInterface* pAuthInterface = NGMP_OnlineServicesManager::GetInterface<NGMP_OnlineServices_AuthInterface>();
854+ if (pAuthInterface != nullptr )
855+ {
856+ userID = pAuthInterface->GetUserID ();
857+ strDisplayname = pAuthInterface->GetDisplayName ();
858+ }
859+ std::string strUserID = std::format (" {}" , userID);
860+
861+
862+ sentry_value_t userinfoVal = sentry_value_new_object ();
863+ sentry_value_set_by_key (userinfoVal, " user_id" , sentry_value_new_int32 (userID));
864+ sentry_value_set_by_key (userinfoVal, " user_displayname" , sentry_value_new_string (strDisplayname.c_str ()));
865+ sentry_set_context (" user_info" , userinfoVal);
866+
867+ sentry_set_tag (" user_id" , strUserID.c_str ());
868+ sentry_set_tag (" user_displayname" , strDisplayname.c_str ());
850869
851870#if _DEBUG
852871 sentry_options_set_debug (options, 1 );
You can’t perform that action at this time.
0 commit comments